/*
 * Copyright (c) zhg2yqq.com Corp.
 * All Rights Reserved.
 */
package com.zhg2yqq.wheels.common.exception;

/**
 * @author zhg2yqq, 2022年12月14日
 * @version zhg2yqq v1.0
 */
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private String code;
    private String defaultMessage;
    private Object[] parameters;

    public BaseException(String code) {
        super();
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public String getDefaultMessage() {
        return defaultMessage;
    }

    public void setDefaultMessage(String defaultMessage) {
        this.defaultMessage = defaultMessage;
    }

    @Override
    public String getMessage() {
        return defaultMessage;
    }

    public Object[] getParameters() {
        return parameters;
    }

    public void setParameters(Object[] parameters) {
        this.parameters = parameters;
    }
}
